package com.manage.colligationQuery;

import java.sql.SQLException;

import javax.naming.NamingException;

import com.framework.Dao;
import com.util.DBUtil;

public class ColligationQueryOfMsgerDao extends Dao {
	
	public ColligationQueryOfMsgerVo query(ColligationQueryOfMsgerVo vo){
		String sql = "select id, name, gender, position, religion, phonenumber, idcardnumber,corporation,address," +
		"   appointmentnum,apppintmentdate,print,nation,detachment" +
		" from messengerinformition " + this.makeWhere(vo);
		try {
			return DBUtil.querySingular(sql, new ColligationQueryOfMsgerVo());
		} catch (SecurityException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			e.printStackTrace();
		} catch (NamingException e) {
			e.printStackTrace();
		} catch (InstantiationException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		} catch (NoSuchFieldException e) {
			e.printStackTrace();
		}
		return null;
	}
}
